package com.hou;

import java.util.Scanner;

public class Test01 {
    public static void main(String[] args){
        Scanner scanner = new Scanner(System.in);
        int k =scanner.nextInt();
        System.out.println("共找到"+DevivingInt(k)+"种拆分方法");
    }

    public static int DevivingInt(int num){
        int count = 0,sum=0,start,end;//count记录拆分方法总数，start是满足拆分的起始值，end是结束值
        for(int i=1;i<=num/2;i++){
            start=i;
            sum=0;
            end=0;
            for(int j=start;j<=num;j++){
                if((sum+j)<num){
                    sum+=j;

                }
                else if(sum+j==num){   //取到满足要求的序列了
                    end=j;
                    print(start,end);//打印函数
                    count++;

                }
                else{
                    break;
                }
            }

        }
        return count;
    }

    public static void print(int start, int end){
        while(start<end){
            System.out.print(start+"+");
            start++;
        }
        System.out.println(end);
    }
}
